import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const routes = [
  {
    path: '/',
    name: 'DataView',
    component: () => import('@/views/DataView.vue')
  },
  {
    path: '/data/add',
    name: 'AddDataView',
    component: () => import('@/views/AddDataView.vue')
  },
  {
    path: '/data/detail/:id',
    name: 'DetailView',
    component: () => import('@/views/DetailView.vue')
  },
  {
    path: '/data/edit/:id',
    name: 'EditDataView',
    component: () => import('@/views/EditDataView.vue')
  }
]

const router = new Router({
  routes
})

export default router
